<?php
require $_SERVER['DOCUMENT_ROOT'] . '/tabp/modules/DBObject.php';
/**
 * File
 *
 * @author tpr
 */
class File extends DBObject
{
    private $url;
    private $section_id, $category_id;
    
    function __construct($name, $url) 
    {
        $this->setName($name);
        $this->setURL($url);
    }
    
    public function setURL($url)
    {
        if (is_string($url))
        {
            $this->url = $url;
        }
    }
    
    public function getURL()
    {
        $this->url;
    }
    
    public function setSection($section_id)
    {
       if (is_integer($section_id))
       {
           $this->section_id = $section_id;
       }
    }
    
    public function getSection()
    {
        return $this->section_id;
    }
    
        public function setCategory($category_id)
    {
       if (is_integer($category_id))
       {
           $this->category_id = $category_id;
       }
    }
    
    public function getCategory()
    {
        return $this->category_id;
    }

// TODO: Erstellen..
    public function createObject()
    {
        
    }

// TODO: Speichern der Dateiinformationen in der DB.
    public function saveObject()
    {
        
    }

// TODO: Laden der Dateiinformationen aus der DB.
    public function loadObjectByID($id) 
    {
        
    }
}
?>